home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat2 / standard / getjlimit.z / getjlimit
Encoding:
Text File  |  2001-04-17  |  8.9 KB  |  133 lines

  1.  
  2.  
  3.  
  4. ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))                                                      ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      getjlimit, setjlimit - control a job's maximum system resource
  10.      consumption
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ssssyyyyssss////rrrreeeessssoooouuuurrrrcccceeee....hhhh>>>>
  14.  
  15.      iiiinnnntttt ggggeeeettttjjjjlllliiiimmmmiiiitttt((((jjjjiiiidddd____tttt jjjjiiiidddd,,,, iiiinnnntttt rrrreeeessssoooouuuurrrrcccceeee,,,, ssssttttrrrruuuucccctttt rrrrlllliiiimmmmiiiitttt ****rrrrllllpppp))))
  16.  
  17.      iiiinnnntttt sssseeeettttjjjjlllliiiimmmmiiiitttt((((jjjjiiiidddd____tttt jjjjiiiidddd,,,, iiiinnnntttt rrrreeeessssoooouuuurrrrcccceeee,,,, ssssttttrrrruuuucccctttt rrrrlllliiiimmmmiiiitttt ****rrrrllllpppp))))
  18.  
  19. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  20.      Limits on the consumption of a variety of system resources by a job may
  21.      be obtained with the _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt function and set by the _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt
  22.      function.
  23.  
  24.      The _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt function gets the current and maximum job limits values for
  25.      the specified job ID.  If the _j_i_d value is 0, _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt returns the
  26.      values for the current job.  If the _j_i_d value is not 0, values are
  27.      returned for the specified job.  The CAP_MAC_Read capability is needed to
  28.      retrieve values from jobs belonging to other users.  The _r_e_s_o_u_r_c_e value
  29.      is one of the _J_L_I_M_I_T values in the resource.h file.  Values are returned
  30.      in the _r_l_p structure.
  31.  
  32.      The _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt function sets the current and maximum job limits values for
  33.      the specified job ID.  If the current job is different from the job being
  34.      requested, the _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt function checks for the CAP_MAC_WRITE
  35.      capability.  If the maximum (hard) limits are being raised, the _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt
  36.      function checks for the CAP_PROC_MGT capability.  See the capability(4)
  37.      and capabilities(4) man pages for more information on the capability
  38.      mechanism that provides fine grained control over the privileges of a
  39.      process.
  40.  
  41.      The possible resources, their descriptions, and the actions taken when
  42.      current limit is exceeded, are summarized below:
  43.  
  44.      JJJJLLLLIIIIMMMMIIIITTTT____CCCCPPPPUUUU       The maximum amount of CPU time in seconds used by all
  45.                       processes in the job.  _SSSS_IIII_GGGG_XXXX_CCCC_PPPP_UUUU is sent to any process in
  46.                       the job which exceeds this limit.  If the job is holding
  47.                       or ignoring _SSSS_IIII_GGGG_XXXX_CCCC_PPPP_UUUU, the behavior is scheduling class
  48.                       defined.  Unless the _SSSS_VVVV_RRRR_4444______SSSS_IIII_GGGG_NNNN_AAAA_LLLL_SSSS variable in
  49.                       _////_eeee_tttt_cccc_////_dddd_eeee_ffff_aaaa_uuuu_llll_tttt_////_llll_oooo_gggg_iiii_nnnn is set to NO, this signal will be
  50.                       ignored by default.  The system administrator can set a
  51.                       grace period using the _ssss_yyyy_ssss_tttt_uuuu_nnnn_eeee(1M) command to set the
  52.                       ccccppppuuuulllliiiimmmmiiiitttt____ggggrrrraaaacccceeeettttiiiimmmmeeee parameter.  If the grace period is
  53.                       set, each process will be allowed to continue executing
  54.                       for "grace period" seconds after the _SSSS_IIII_GGGG_XXXX_CCCC_PPPP_UUUU signal is
  55.                       received.  If a process is still executing after the
  56.                       grace period has expired, it is terminated using a
  57.                       _SSSS_IIII_GGGG_KKKK_IIII_LLLL_LLLL signal.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))                                                      ggggeeeettttjjjjlllliiiimmmmiiiitttt((((2222))))
  71.  
  72.  
  73.  
  74.      JJJJLLLLIIIIMMMMIIIITTTT____DDDDAAAATTTTAAAA      The maximum size of a job's heap in bytes.  A _bbbb_rrrr_kkkk(2)
  75.                       which attempts to exceed this limit will fail with errno
  76.                       set to _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM.
  77.  
  78.      JJJJLLLLIIIIMMMMIIIITTTT____NNNNOOOOFFFFIIIILLLLEEEE    The maximum number of open file descriptors that the all
  79.                       processes in the job can have.  Functions that attempt
  80.                       to create new file descriptors beyond this limit will
  81.                       fail with errno set to _EEEE_MMMM_FFFF_IIII_LLLL_EEEE.
  82.  
  83.      JJJJLLLLIIIIMMMMIIIITTTT____NNNNUUUUMMMMPPPPRRRROOOOCCCC   The maximum number of processes that can be created
  84.                       within the job.  The fork function will fail with the
  85.                       eeeerrrrrrrrnnnnoooo set to _EEEE_AAAA_GGGG_AAAA_IIII_NNNN.
  86.  
  87.      JJJJLLLLIIIIMMMMIIIITTTT____VVVVMMMMEEEEMMMM      The maximum size of all processes in the job's mapped
  88.                       address space in bytes.  _bbbb_rrrr_kkkk(2) and _mmmm_mmmm_aaaa_pppp(2) functions
  89.                       which attempt to exceed this limit will fail with errno
  90.                       set to _EEEE_NNNN_OOOO_MMMM_EEEE_MMMM.
  91.  
  92.      JJJJLLLLIIIIMMMMIIIITTTT____PPPPMMMMEEEEMMMM      The maximum amount of physical memory a job may consume.
  93.                       If a job exceeds this limit, all of the processes
  94.                       associated with the job are killed.  Also see the
  95.                       _JJJJ_LLLL_IIII_MMMM_IIII_TTTT______RRRR_SSSS_SSSS limit.
  96.  
  97.      JJJJLLLLIIIIMMMMIIIITTTT____RRRRSSSSSSSS       The maximum size, in bytes to which a job's resident set
  98.                       size may grow.  This imposes a limit on the amount of
  99.                       physical memory to be given to a job; if memory is
  100.                       tight, the system will prefer to take memory from jobs
  101.                       that are exceeding their declared resident set size.
  102.  
  103.      The value of the current limit of the following resources affect these
  104.      implementation defined constants:
  105.                     Limit   Implementation Defined Constant
  106.                     __________________________________________
  107.                     JLIMIT_NOFILE   OPEN_MAX
  108.  
  109. EEEERRRRRRRROOOORRRRSSSS
  110.      Under the following conditions, the functions _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt and _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt
  111.      fail and set _e_r_r_n_o to:
  112.  
  113.      [ENOPKG]       The job limits software is not installed.
  114.  
  115.      [ENOJOB]       A job with the specified job ID cannot be found.
  116.  
  117. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  118.      jlimit(1), jstat(1), getjusage(2), getrlimit(2).
  119.  
  120. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  121.      Upon successful completion, _gggg_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt and _ssss_eeee_tttt_jjjj_llll_iiii_mmmm_iiii_tttt return a value of 0.
  122.      Otherwise, a value of -1 is returned and eeeerrrrrrrrnnnnoooo is set to indicate the
  123.      error.
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.